<template>
	<div>
		<div>
		<el-form ref="queryForm" :inline="true">
		  <el-form-item label="用户名：">
		    <el-input v-model="username"></el-input>
		  </el-form-item>
		  <el-form-item>
		    <el-button type="primary" @click="submitForm">查询</el-button>
		    <router-link :to="{path:'/user/admin/edit'}" class="link-left">
		      <el-button type="primary">添加</el-button>
		    </router-link>
		  </el-form-item>
		</el-form>
		<el-table :data="tableData" border fit highlight-current-row style="width: 100%">
		  <el-table-column prop="id" label="Id" />
		  <el-table-column prop="userName" label="用户名"/>
		  <el-table-column prop="realName" label="真实姓名" />
		  <el-table-column prop="sex" label="性别" width="60px;"/>
		  <el-table-column prop="phone" label="手机号"/>
		  <el-table-column prop="createTime" label="创建时间" width="160px"/>
		  <el-table-column width="220px" label="操作" align="center">
		    <template slot-scope="{row}">
		      <router-link :to="{path:'/user/admin/edit', query:{id:row.id}}" class="link-left">
		        <el-button size="mini">编辑</el-button>
		      </router-link>
		      <el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button>
		    </template>
		  </el-table-column>
		</el-table>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'admin',
		data(){
			return{
				username:'',
				tableData:[
					{
						id:1,
						userName:'木有',
						realName:'hope',
						sex:'男',
						phone:'13183243537',
						createTime:'2020-2-3',
						status:1
						
					}
				],
				
			}
		},
		created() {
			
		},
		
		methods:{
			search(){
				
			},
			submitForm(){
				
			},
			deleteUser(){}
		}
	}
</script>

<style>
</style>
